import Vue from 'vue'
import Router from 'vue-router'
import loginView from '@/components/loginView'
import adminView from '@/components/adminView'
import studentView from '@/components/studentView'
import teacherView from '@/components/teacherView'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/login',
      name: '后台登陆',
      component: loginView
    },
    {
      path: '/admin',
      name: '后台登陆',
      component: adminView,
      children:[
         {
           path:"/student",
           name:"学生管理",
           component:studentView
         },
         {
           path:"/teacher",
           name:"老师管理",
           component:teacherView
         }

      ]
    }

  ]
})
